<template>
  <nav-bar class="nav-bar">
    <div class="center" slot="center">编辑地址</div>
    <div class="right" slot="right" @click="handleSwitchText">
      <span v-show="!isShow">编辑</span>
      <span v-show="isShow">完成</span>
    </div>
  </nav-bar>
</template>

<script>
import NavBar from "components/common/navbar/NavBar";
export default {
  data() {
    return {
      isShow: false,
    };
  },
  methods: {
    handleSwitchText() {
      this.isShow = !this.isShow;
      this.$bus.$emit("handleSwitchText", this.isShow);
    },
  },
  components: {
    NavBar,
  },
};
</script>
<style lang="less" scoped>
.nav-bar {
  color: #fff;
}
</style>